<!-- 工站管理 -->
<template>
    <div id="station">
        <!-- 响应式布局 -->
        <!--<el-row >  默认占满屏 一用就把左边的覆盖了，不知道为什么 -->
        <div style="width: 100%;height: 85px;background-color: #FAFAFA;padding-top: 1%;">
            <el-col :xs="3" :sm="3" :md="2" :lg="2" style="margin: 0 0 0 2%">
                <el-input placeholder="工站号" v-model="WorkStationNum"></el-input>
            </el-col>
            <el-col :xs="3" :sm="2" :md="2" :lg="2" style="margin: 0 1%">
                <el-input placeholder="工站名称" v-model="WorkStationName"></el-input>
            </el-col>
            <!-- 工厂 -->
            <el-col :xs="3" :sm="2" :md="2" :lg="2">
                <el-select @change="GetDepart" v-model="valueFactory" clearable placeholder="工厂">
                    <el-option v-for="item in FactoryOptions" :key="item.ID" :label="item.FactoryName" :value="item.ID"></el-option>
                </el-select>
            </el-col>
            <!-- 部门 -->
            <el-col :xs="3" :sm="2" :md="2" :lg="2" style="margin: 0 1%">
                <el-select @change="GetOffice"  v-model="valueDepart" clearable placeholder="隶属部门">
                    <el-option v-for="item in DepartOptions" :key="item.DepartmentCode" :label="item.DepartmentName" :value="item.DepartmentCode"></el-option>
                </el-select>
            </el-col>
            <!-- 科室 -->
            <el-col :xs="3" :sm="2" :md="2" :lg="2" style="margin: 0 1% 0 0">
                <el-select  v-model="valueOffice" clearable placeholder="隶属科室">
                    <el-option v-for="item in OfficeOptions" :key="item.OfficeCode" :label="item.OfficeName" :value="item.OfficeCode"></el-option>
                </el-select>
            </el-col>
            <el-col :xs="8" :sm="8" :md="6" :lg="4" style="text-align: left">
                <el-button type="primary" @click="selectTable">查询</el-button>
                <el-button type="success" @click="add">新增工站</el-button>
            </el-col>
        </div>
<!-- max-height 600时就苦丁表头，显示滚动条  show-overflow-tooltip 表格内容多了可以显示一个提示框显示剩余内容   sortable排序 -->
        <el-table  max-height="600" class="table_station" stripe border ref="multipleTable" :data="tableData" tooltip-effect="dark"
                  style="width: 88%;text-align: center !important;">
            <el-table-column prop="index" sortable width="60"></el-table-column>
            <el-table-column prop="WorkStationNum" sortable label="工站号"></el-table-column>
            <el-table-column prop="WorkStationName" label="工站名称"></el-table-column>
            <el-table-column prop="OfficeCode" sortable label="隶属科室ID" v-if="false"></el-table-column>
            <el-table-column prop="OfficeName" sortable label="隶属科室"></el-table-column>
            <el-table-column prop="DepartmentCode" sortable label="隶属部门ID" v-if="false"></el-table-column>
            <el-table-column prop="DepartmentName" sortable label="隶属部门"></el-table-column>
            <el-table-column prop="FactoryID" sortable label="隶属工厂ID" v-if="false"></el-table-column>
            <el-table-column prop="FactoryName" sortable label="隶属工厂" v-if="false"></el-table-column>
            <el-table-column prop="WorkContent" label="工作内容" show-overflow-tooltip></el-table-column>
            <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
            <el-table-column prop="ModifyDate" sortable label="时间"></el-table-column>
            <el-table-column prop="UserName" sortable label="操作人员"></el-table-column>
            <!-- 修改和删除 -->
            <el-table-column prop="edit" label="操作" fixed="right">
                <template scope="scope">
                    <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                    <el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
        <!-- 分页 -->
        <div class="block" style="text-align: right;padding: 4% 1% 0 0">       <!-- , jumper 加到layout里面 前往第 几 页     -->
            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-size="PageCount" :page-sizes="[10, 20, 30, 40,50]"
                            :current-page="CurrentPage"  layout="total,sizes, prev, pager, next" :total="Total"></el-pagination>
        </div>
        <!-- 新增工站 -->
        <el-dialog title="新增工站" :visible.sync="dialogFormVisible" >
            <el-form :model="form" style="width: 90%;height: 100%;margin: auto;text-align: left">
                <el-form-item label="隶属工厂"  :label-width="formLabelWidth">
                    <el-select @change="AddGetDepart" v-model="AddvalueFactory" clearable placeholder="工厂">
                        <el-option v-for="item in AddFactoryOptions" :key="item.ID" :label="item.FactoryName" :value="item.ID"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="隶属部门"  :label-width="formLabelWidth">
                    <el-select @change="AddGetOffice"  v-model="AddvalueDepart" clearable placeholder="隶属部门">
                        <el-option v-for="item in AddDepartOptions" :key="item.DepartmentCode" :label="item.DepartmentName" :value="item.DepartmentCode"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="隶属科室"  :label-width="formLabelWidth">
                    <el-select  v-model="AddvalueOffice" clearable placeholder="隶属科室">
                        <el-option v-for="item in AddOfficeOptions" :key="item.OfficeCode" :label="item.OfficeName" :value="item.OfficeCode"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="工站名称" :label-width="formLabelWidth">
                    <el-input v-model="form.WorkStationName" auto-complete="off" style="width: 80%"></el-input>
                </el-form-item>
                <el-form-item label="工站内容" :label-width="formLabelWidth">
                    <el-input type="textarea" style="width: 85%"  :autosize="{ minRows: 0, maxRows: 8}" v-model="form.WorkContent" auto-complete="off"></el-input>
                </el-form-item>
                <el-form-item label="工站备注" :label-width="formLabelWidth">
                    <el-input type="textarea" style="width: 85%"  :autosize="{ minRows: 0, maxRows: 8}" v-model="form.Remark" auto-complete="off"></el-input>
                </el-form-item>

            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogFormVisible = false">取 消</el-button>
                <el-button type="primary" @click="addForm">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 修改工站 -->
        <el-dialog title="修改工站" :visible.sync="EditFormVisible" style="">
            <el-form :model="formEdit" style="text-align: left;width: 90%;margin: auto">
                <!--&lt;!&ndash; 工厂 &ndash;&gt;-->
                <el-form-item label="隶属工厂" :label-width="formLabelWidthEdit">
                    <el-select @change="EditGetDepart" v-model="formEdit.FactoryID" clearable placeholder="工厂">
                        <el-option v-for="item in EditFactoryOptions" :key="item.ID" :label="item.FactoryName" :value="item.ID"></el-option>
                    </el-select>
                </el-form-item>
                <!-- 部门 -->
                <el-form-item label="隶属部门" :label-width="formLabelWidthEdit">
                    <el-select @change="EditGetOffice" v-model="formEdit.DepartmentCode" clearable placeholder="隶属部门">
                        <el-option v-for="item in EditDepartOptions" :key="item.DepartmentCode" :label="item.DepartmentName" :value="item.DepartmentCode"></el-option>
                    </el-select>
                </el-form-item>
                <!-- 科室 -->
                <el-form-item label="隶属科室" :label-width="formLabelWidthEdit">
                    <el-select  v-model="formEdit.OfficeCode" clearable placeholder="隶属科室">
                        <el-option v-for="item in EditOfficeOptions" :key="item.OfficeCode" :label="item.OfficeName" :value="item.OfficeCode"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="工站代号" :label-width="formLabelWidthEdit">
                    <el-input v-model="formEdit.WorkStationNum" :disabled="true" style="width: 80%;"></el-input>
                </el-form-item>
                <el-form-item label="工站名称" :label-width="formLabelWidthEdit">
                    <el-input v-model="formEdit.WorkStationName" auto-complete="off" style="width: 80%;"></el-input>
                </el-form-item>
                <el-form-item label="工站内容" :label-width="formLabelWidthEdit">
                    <el-input type="textarea" :autosize="{ minRows: 0, maxRows: 8}" v-model="formEdit.WorkContent" auto-complete="off" style="width: 80%;"></el-input>
                </el-form-item>
                <el-form-item label="工站备注" :label-width="formLabelWidthEdit">
                    <el-input type="textarea" :autosize="{ minRows: 0, maxRows: 8}" v-model="formEdit.Remark" auto-complete="off" style="width: 80%;"></el-input>
                </el-form-item>

            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="EditFormVisible = false">取 消</el-button>
                <el-button type="primary" @click="EditForm">提 交</el-button>
            </div>
        </el-dialog>
        <!-- 删除工站 -->
        <el-dialog title="删除工站" :visible.sync="DeleteFormVisible" style="">
            <el-form :model="formDelete">
                <el-form-item style="font-size: 18px;">
                    确定删除此工站吗？
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="DeleteFormVisible = false">取 消</el-button>
                <el-button type="danger" @click="DeleteForm" >确定</el-button>
            </div>
        </el-dialog>
    </div>
</template>


<script type="text/javascript">
    export default {
        data (){
            return {
                //    表格
                tableData:[],
                //  工厂
                FactoryOptions:[],    //  工厂   一加载页面就出现工厂的下拉框
                valueFactory:'',    //  选择的是哪个工厂号
                //  部门
                DepartOptions:[],    //  工厂   一选择工厂就确定有哪些部门
                valueDepart:'',    //  选择的是哪个部门
                //  科室
                OfficeOptions:[],    //  工厂   一选择部门就确定有哪些科室
                valueOffice:'',    //  选择的是哪个科室
                //   按条件 查询
                WorkStationNum: '',
                WorkStationName:'',
                //     分页
                PageCount:10 ,    // 每页几条   page-size
                CurrentPage:1,   // 当前是第几页
                Total:0,    // 总数
                //   新增工站
                //  工厂
                AddFactoryOptions:[],    //  工厂   一加载页面就出现工厂的下拉框
                AddvalueFactory:'',    //  选择的是哪个工厂号
                //  部门
                AddDepartOptions:[],    //  工厂   一选择工厂就确定有哪些部门
                AddvalueDepart:'',    //  选择的是哪个部门
                //  科室
                AddOfficeOptions:[],    //  工厂   一选择部门就确定有哪些（科室）
                AddvalueOffice:'',    //  选择的是哪个科室
                dialogFormVisible: false,
                form: {
                    WorkStationNum: '',
                    WorkStationName:'',
                    DepartmentName: '',
                    WorkContent: '',
                    Remark: ''
                },
                formLabelWidth: '120',
                //  修改工站
                //  工厂
                EditFactoryOptions:[],    //  工厂   一加载页面就出现工厂的下拉框
                //  部门
                EditDepartOptions:[],    //  工厂   一选择工厂就确定有哪些部门
                //  科室
                EditOfficeOptions:[],    //  工厂   一选择部门就确定有哪些（科室）
                EditFormVisible: false,
                formEdit:{},
                formLabelWidthEdit:'120',
                //  删除工站
                DeleteFormVisible: false,
                formDelete:{},
                formLabelWidthDelete:'120',
            }
        },
        methods: {
            //    分页
            handleSizeChange(val) {
                this.PageCount = val ;   //  每页几条
                this.selectTable();
            },
            handleCurrentChange(val) {
                this.CurrentPage = val ;   // 当前是第几页
                this.selectTable();     //  点击分页的时候
            },
            //   一加载页面就应该知道有哪些工厂
            GetFactory(){    // 校验输入信息正确性 ，不对直接  return
                let url = "http://192.168.3.238:8088/Department/GetFactoryInfo" ;
                this.$http.get(url,).then(response => {
                    this.FactoryOptions = [];
                    let Code = response.data.Code;
                    if(Code == 200){   // 正常请求到数据
                        this.FactoryOptions = response.data.ObjList ;
                    }
                }, response => {
                    console.log(" 工厂请求失败");
                    console.log(response)
                })
            },
            //  一选择工厂，就知道有哪些部门
            GetDepart(){
                let url = "http://192.168.3.238:8088/Department/GetParentDepartment?FactoryID=" + this.valueFactory ;
                this.$http.get(url,).then(response => {
                    let Code = response.data.Code;
                    console.log("隶属部门 ");
//                    console.log(response.data);
                    if(Code == 200){   // 正常请求到数据
                        this.DepartOptions = response.data.ObjList ;
                    }
                }, response => {
                    console.log(" 父级请求失败");
                    console.log(response)
                })
            },
            //  一选择部门，就知道有哪些科室
            GetOffice(){
                let url = "http://192.168.3.238:8088/OfficeManager/GetOfficeByPre?DepartCode=" + this.valueDepart ;
                this.$http.get(url,).then(response => {
                    let Code = response.data.Code;
                    if(Code == 200){   // 正常请求到数据
                        this.OfficeOptions = response.data.ObjList ;
                    }
                }, response => {
                    console.log(" 请求失败");
                    console.log(response)
                })
            },
            //   工站  表格
            selectTable(){    // 校验输入信息正确性 ，不对直接  return
                let url;
                this.WorkStationNum = this.WorkStationNum.trim();  // 1、 去空格判断
                this.WorkStationName = this.WorkStationName.trim();
//                WorkStationNum   WorkStationName  OfficeCode  PageCount  CurrentPage
//                if(this.WorkStationNum.length===0 && this.valueOffice.length === 0){   // 2、工站号为空时，传给后台 为 0
//                    url = "http://192.168.3.238:8088/WorkStationManager/GetWorkStationPage?WorkStationNum=" + 0 + "&WorkStationName=" +
//                        this.WorkStationName + "&OfficeCode="+ 0 +"&PageCount="+this.PageCount+"&CurrentPage="+ this.CurrentPage;
//                }
//                if(this.valueOffice.length===0){
//                    url = "http://192.168.3.238:8088/WorkStationManager/GetWorkStationPage?WorkStationNum=" + this.WorkStationNum + "&WorkStationName=" +
//                        this.WorkStationName + "&OfficeCode="+ 0 +"&PageCount="+this.PageCount+"&CurrentPage="+ this.CurrentPage;
//                }
//                if(this.WorkStationNum.length===0 ){
//                    url = "http://192.168.3.238:8088/WorkStationManager/GetWorkStationPage?WorkStationNum=" + 0 + "&WorkStationName=" +
//                        this.WorkStationName + "&OfficeCode="+this.valueOffice+"&PageCount="+this.PageCount+"&CurrentPage="+ this.CurrentPage;
//                }
//                else{
                    url = "http://192.168.3.238:8088/WorkStationManager/GetWorkStationPage?WorkStationNum=" + this.WorkStationNum + "&WorkStationName=" +
                        this.WorkStationName + "&OfficeCode=" +this.valueOffice+"&PageCount="+this.PageCount+"&CurrentPage="+ this.CurrentPage;
//                }
                console.log("url")
                console.log(url)
                this.$http.get(url,).then(response=>{
                    this.tableData=[];
                    let Code = response.data.Code;
                    if(Code == 200){   // 正常请求到数据
                        this.Total = response.data.Total;
                        for(let i=0;i<response.data.ObjList.length;i++){
                            this.tableData.push(response.data.ObjList[i]);
                            response.data.ObjList[i].index=i+1;
                        }
                        console.log("工站表格")
                        console.log(response)
                    }
                }, response => {
                    console.log(" 表格添加失败")
                    console.log(response)
                })
            },
            //   一点击新增   就应该知道有哪些工厂
            AddGetFactory(){    // 校验输入信息正确性 ，不对直接  return
                let url = "http://192.168.3.238:8088/Department/GetFactoryInfo" ;
                this.$http.get(url,).then(response => {
                    let Code = response.data.Code;
                    if(Code == 200){   // 正常请求到数据
                        this.AddFactoryOptions = response.data.ObjList ;
                    }
                }, response => {
                    console.log(" 工厂请求失败");
                    console.log(response)
                })
            },
            //  一选择工厂，就知道有哪些部门
            AddGetDepart(){
                let url = "http://192.168.3.238:8088/Department/GetParentDepartment?FactoryID=" + this.AddvalueFactory ;
                this.$http.get(url,).then(response => {
                    let Code = response.data.Code;
                    console.log("隶属部门 ");
//                    console.log(response.data);
                    if(Code == 200){   // 正常请求到数据
                        this.AddDepartOptions = response.data.ObjList ;
                    }
                }, response => {
                    console.log(" 父级请求失败");
                    console.log(response)
                })
            },
            //  一选择部门，就知道有哪些科室
            AddGetOffice(){
                let url = "http://192.168.3.238:8088/OfficeManager/GetOfficeByPre?DepartCode=" + this.AddvalueDepart ;
                this.$http.get(url,).then(response => {
                    let Code = response.data.Code;
                    if(Code == 200){   // 正常请求到数据
                        this.AddOfficeOptions = response.data.ObjList ;
                    }
                }, response => {
                    console.log(" 请求失败");
                    console.log(response)
                })
            },
            //  新增工站
            add() {
                console.log("点击新增按钮 ")
                this.AddGetFactory();
                this.dialogFormVisible = true;
            },
            addForm(){
                //   post
                let addUrl = "http://192.168.3.238:8088/WorkStationManager/AddWorkStation";
                let addForm = {
                    "WorkStationName":this.form.WorkStationName,
                    "OfficeCode":this.AddvalueOffice,     //  科室代号
                    "WorkContent":this.form.WorkContent,
                    "Remark":this.form.Remark,
                    "OperationUser":1
                };
                console.log("addForm是什么");
                console.log(addForm);
                let that = this ;
                if(this.form.WorkStationName.length === 0){
                    alert("请输入工站名");
                    return 0;
                }else{
                    this.$http.post(addUrl, addForm, {
                        headers: {
                            'Content-Type': 'application/x-www-form-urlencoded'
                        }
                    })
                        .then(function (response) {
                            console.log("添加成功");
                            console.log(response);
                            that.dialogFormVisible = false ;
                            that.selectTable();
                        })
                        .catch(function (error) {
                            console.log("错误");
                            console.log(error);
                        });
                }
            },
            //   表格的操作，工站信息修改
            //   一加载页面就应该知道有哪些工厂
            EditGetFactory(){    // 校验输入信息正确性 ，不对直接  return
                let url = "http://192.168.3.238:8088/Department/GetFactoryInfo" ;
                this.$http.get(url,).then(response => {
                    let Code = response.data.Code;
                    if(Code == 200){   // 正常请求到数据
                        this.EditFactoryOptions = response.data.ObjList ;
                    }
                }, response => {
                    console.log(" 工厂请求失败");
                    console.log(response)
                })
            },
            //  一选择工厂，就知道有哪些部门
            EditGetDepart(){
                let url = "http://192.168.3.238:8088/Department/GetParentDepartment?FactoryID=" + this.formEdit.FactoryID ;
                this.$http.get(url,).then(response => {
                    let Code = response.data.Code;
                    console.log("隶属部门");
                    if(Code == 200){   // 正常请求到数据
                        this.EditDepartOptions = response.data.ObjList ;
                        console.log("一选择工厂 有哪些部门 >>>>>>>>>>>>>>>>> ")
                        console.log(response.data)
                    }
                }, response => {
                    console.log(" 父级请求失败");
                    console.log(response)
                })
            },
            //  一选择部门，就知道有哪些科室
            EditGetOffice(){
                let url = "http://192.168.3.238:8088/OfficeManager/GetOfficeByPre?DepartCode=" + this.formEdit.DepartmentCode ;
                this.$http.get(url,).then(response => {
                    let Code = response.data.Code;
                if(Code == 200){   // 正常请求到数据
                    this.EditOfficeOptions = response.data.ObjList ;
                }
            }, response => {
                    console.log(" 请求失败");
                    console.log(response)
                })
            },
            handleEdit(index, row) {
                this.EditGetFactory();   //  一点击  编辑  就显示工厂下拉框
                this.EditGetDepart();   //  一点击  编辑  就显示部门下拉框
                this.EditGetOffice();   //  一点击  编辑  就显示科室下拉框
                this.EditFormVisible = true;
                this.formEdit = row ;
                console.log("点击编辑按钮")
                console.log(this.formEdit)
            },
            EditForm() {    //   post
                let EditUrl = "http://192.168.3.238:8088/WorkStationManager/UpdateWorkStation";
                let EditForm = {
                    "OfficeCode":this.formEdit.OfficeCode,
                    "WorkStationNum":this.formEdit.WorkStationNum,
                    "WorkStationName":this.formEdit.WorkStationName,
                    "WorkContent":this.formEdit.WorkContent,
                    "Remark":this.formEdit.Remark,
                    "OperationUser":1
                };
                console.log("修改工站");
                console.log(EditForm);
                let that = this ;
                    this.$http.post(EditUrl, EditForm, {
                        headers: {
                            'Content-Type': 'application/x-www-form-urlencoded'
                        }
                    })
                        .then(function (response) {
                            that.EditFormVisible = false;
                            that.selectTable();
                            console.log("修改成功");
                            console.log(response);
//                        需要提示
                        })
                        .catch(function (error) {
                            console.log("错误");
                            console.log(error);
                        });
            },
            //   工站信息删除
            handleDelete(index, row) {
                this.DeleteFormVisible = true ;
                this.formDelete = row ;
            },
            DeleteForm(){
                let DeleteUrl = "http://192.168.3.238:8088/WorkStationManager/DeleteWorkStation";
                let deleteItem = {   //  跟后端约定好的JSON格式
                    "WorkStationNum":this.formDelete.WorkStationNum,
                    "OperationUser":1
                };
                let that = this;  //   that管用吗   管用的，想自动刷新就在执行成功的方法里重新  searchTable 就行了
                this.$http.post(DeleteUrl, deleteItem, {
                    headers: {
                        'Content-Type': 'application/x-www-form-urlencoded'
                    }
                })
                    .then(function (response) {
                        console.log("删除成功")
                        that.DeleteFormVisible = false;     //  关闭窗口
                        that.selectTable();
//                        需要提示
                    })
                    .catch(function (error) {
                        console.log("错误");
                        console.log(error);
                    });
                }
            },
        mounted :function () {   //  onload
            this.selectTable();
            this.GetFactory();  //  工厂
        }
    }

</script>

<style>
    * {
        padding: 0;
    }

    html,
    body {
        height: 100%;
        width: 100%;
        overflow: hidden;
        margin: 0;
    }

    #station {
        height: 100%;
    }
/* 表头数据居中 */
    .table_station thead tr th {
        text-align: center;
    }

</style>

<!--//            selectTable(){       post-->
<!--//                let Url = "http://192.168.3.238:8088/WorkStationManager/GetWorkStationPage";-->
<!--//                let addTable = {-->
<!--//                    "WorkStationNum":this.WorkStationNum,-->
<!--//                    "WorkStationName":this.WorkStationName,-->
<!--//                    "DepartID":this.DepartID,-->
<!--//                    "PageCount":10,   //  10条每页-->
<!--//                    "CurrentPage":4   //  当前是第四页-->
<!--//                }-->
<!--//                console.log('addTable可还行')-->
<!--//                console.log(addTable)-->
<!--//                this.$http.post(Url, addTable, {-->
<!--//                    headers: {-->
<!--//                        'Content-Type': 'application/x-www-form-urlencoded'-->
<!--//                    }-->
<!--//                })-->
<!--//                    .then(function (response) {-->
<!--//                        console.log(response);-->
<!--//                        console.log("添加成功");-->
<!--//                    })-->
<!--//                    .catch(function (error) {-->
<!--//                        console.log(error);-->
<!--//                        console.log("错误");-->
<!--//                    });-->
<!--//            },-->


<!--//  请求后台接口   get-->
<!--//            httpGongZhan(){-->
<!--//                console.log("post11111111")-->
<!--//                console.log(this.WorkStationNum)-->
<!--//                console.log(this.WorkStationName)-->
<!--//                console.log(this.DepartID)-->
<!--//                this.$http.get("http://192.168.3.238:8088/WorkStationManager/GetWorkStation").then(response => {-->
<!--////                this.$http.get("http://115.159.216.136/api/vue").then(response => {-->
<!--//                    // success callback-->
<!--//                    console.log("     请求返回的成功内容")-->
<!--//                    console.log(response)-->
<!--//-->
<!--//                }, response => {-->
<!--//                    // error callback-->
<!--//                    console.log("     返回内容")-->
<!--//                    console.log(response)-->
<!--//                })-->
<!--//            },-->